﻿using System.Windows;
using System.Windows.Controls;
using System.Collections.Generic;
// fluent stuff
using Fluent;
using NetSnoop.TcpHelper;


namespace NetSnoop
{

    /// <summary>
    /// Interaktionslogik für MainWindow.xaml
    /// </summary>
    public partial class Window : RibbonWindow
    {
          
        private void RibbonWindow_Loaded(object sender, RoutedEventArgs e)
        {

            UpdateConnections();
        }

        private void UpdateConnections()
        {
            // retrieve data
            TcpTable ActiveConnections = TcpHelperWrapper.GetExtendedTcpTable(true);

            // bind list to ListView
            listConnection.ItemsSource = ActiveConnections;
        }
    }
}
